package com.atguigu.controller;

import com.atguigu.pojo.User;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
//标签 ,标签描述
@Tag(description = "用户控制器",name="UserController")
@RestController
@RequestMapping("/user")
public class UserController {
    //操作, summary概述
    @Operation(summary = "用户注册方法")
    @PostMapping("/regist")
    //Parameter参数描述
    public User regist(@Parameter(name = "user",description = "用户请求体") @RequestBody/*请求体参数*/  User user){
        System.out.println("正在注册");
        return user;
    }

}
